package com.briup.day18;

public class Test_yichang {
    public static void main(String[] args) {
        int[] arr={1,2,3,4};
//        1.System.out.println(arr[4]);//.ArrayIndexOutOfBoundsException
        System.out.println("system after...");
        // 2.ArithmeticException
//        int a = 10 / 0;
//        3.String b="123a";
//        //将字符串转为int类型的数字
//        System.out.println(Integer.parseInt(b));//NumberFormatException
//        Object obj = new Object();
//        4.String s=(String) obj;//ClassCastException
        //需要将new Object();---->new String();
//        arr = null;
//        5.空指针异常：NullPointerException
//        System.out.println(arr[0]);
    }
}
